home *** CD-ROM | disk | FTP | other *** search
/ Atlas of Florida / Atlas of Florida.iso / Movies / 1.0 Introduction / 1.0 Introduction / 00241_Script_241 < prev    next >
Text File  |  1994-08-23  |  2KB  |  64 lines

  1. -- 
  2. on initPopMenu
  3.   openXLib  "PopUp Menu XObj"
  4.   
  5.   -- set up menus
  6.   put "1" into cast "DisValue"
  7.   put "     in" into cast "DisMen1"
  8.   put "     cm" into cast "DisMen2"
  9.   
  10.   -- Spaces after "gal" are important as are all spaces in the menus, 
  11.   --they set the pop up menu width and are needed for the if...then stuff
  12.   put "1" into cast E12
  13.   put "     gal    " into cast E13
  14.   put "     l" into cast E17
  15.   
  16.   put "1" into cast E22
  17.   put "     lb" into cast E23
  18.   put "     kg" into cast E27
  19.   
  20.   put " " into cast "AnswerString"
  21.   
  22.   MakeConversion
  23.   
  24.   --  set these sprites to act on the mouse down, instead of the mouse up
  25.   set the immediate of sprite 6 to TRUE  --  item menu
  26.   set the immediate of sprite 9 to TRUE  --  item menu
  27.   
  28.   set the immediate of sprite 12 to TRUE  --  item menu
  29.   set the immediate of sprite 15 to TRUE  --  item menu
  30.   
  31.   set the immediate of sprite 18 to TRUE  --  item menu
  32.   set the immediate of sprite 21 to TRUE  --  item menu
  33.   
  34.   
  35. on MakeConversionAll
  36.   -- does all the conversions
  37.   if the clickOn = 5 then 
  38.     MakeConversion
  39.     showChannel 8
  40.     -- hide other answers
  41.     hideChannel 14
  42.     hideChannel 20
  43.   else
  44.     if the clickOn = 11 then
  45.       MakeConversionVol
  46.       showChannel 14
  47.       -- hide other answers
  48.       hideChannel 8
  49.       hideChannel 20
  50.     else
  51.       if the clickOn = 17 then
  52.         MakeConversionWgt
  53.         showChannel 20
  54.         -- hide other answers
  55.         hideChannel 8
  56.         hideChannel 14
  57.       end if
  58.     end if
  59.   end if
  60.   
  61.   put " " into cast F33
  62.   
  63. on PopQuit
  64.   closeXLib  "PopUp Menu XObj"